package com.ledi.guns.common.persistence.model;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 学生信息表
 * </p>
 *
 * @author zhongxp
 * @since 2018-08-01
 */
@TableName("t_student")
@Data
public class Student extends Model<Student> {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	/**
	 * 学生姓名
	 */
	private String name;
	/**
	 * 学校id
	 */
	@TableField("school_id")
	private Long schoolId;
	/**
	 * 家长手机号
	 */
	@TableField("parent_mobile")
	private String parentMobile;
	@TableField("create_time")
	private Date createTime;
	@TableField("creator_id")
	private Integer creatorId;
	@TableField("update_time")
	private Date updateTime;
	@TableField("updater_id")
	private Integer updaterId;
	/**
	 * 是否删除
	 */
	@TableField("is_delete")
	private Integer isDelete;

	@TableField("grade_id")
	private Long gradeId;

	@TableField("class_id")
	private Long classId;
	@TableField("creator_role")
	private String creatorRole;
	@TableField("updater_role")
	private String updaterRole;
	@Version
	@TableField("version_no")
	private Integer versionNo;

	@Override
	protected Serializable pkVal() {

		return id;
	}

}
